<!DOCTYPE html>
<html>
<head>
<title>支付确认</title>
<meta charset="UTF-8">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="format-detection" content="telephone=no">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
</head>
<body>
</body>
<script type="text/javascript">
<!--#
  if(result.status==1){
-->
	alert("不存在的订单!");
<!--#
  }else if(result.status==2){
-->
	alert("不支持微信支付!");
<!--#
  }else if(result.status==3){
-->
	alert("不支持支付宝支付!");
<!--#
  }else if(result.status==0){
	 if(result.payType==2){
-->
	  if (window.WeixinJSBridge){
		  wxPay();
	  }else{
	  	if( document.addEventListener ){
			document.addEventListener('WeixinJSBridgeReady', wxPay, false);
		}else if (document.attachEvent){
			document.attachEvent('WeixinJSBridgeReady', wxPay);
			document.attachEvent('onWeixinJSBridgeReady', wxPay);
		}
	  }
	  function wxPay(){
			WeixinJSBridge.invoke('getBrandWCPayRequest',  {
				'appId':'${result.payData.appId}',
				'timeStamp':'${result.payData.timeStamp}',
				'nonceStr':'${result.payData.nonceStr}',
				'package':'${result.payData.packageStr}',
				'signType':'${result.payData.signType}',
				'paySign':'${result.payData.paySign}'
			},
			function(res){
				WeixinJSBridge.invoke('closeWindow');
			});
		};
<!--#
	}else if(result.payType==1){
-->
		if (window.AlipayJSBridge) {
			aliPay();
		} else {
			document.addEventListener('AlipayJSBridgeReady', aliPay, false);
		}
		function aliPay(){
			AlipayJSBridge.call("tradePay", {
			    tradeNO: '${result.payData.tradeNO}'
			},
			function(result) {
			   var resultCode=result.resultCode;
			   AlipayJSBridge.call('popWindow');
			});
		};
<!--#
	}
  };
-->
	</script>
</html>